@import "~@/style/base.less";
@color_border: #e5e5e5e;

.upload_wrap {
  display: flex;
  align-items: center;
}

.upload_list {
  display: flex;
  align-items: center;
  overflow: auto;
  padding: 10px 0;
}

.upload_item {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 8px;
  margin-right: 20px;
  border: 1px solid @color_border;
  > img {
    max-width: 100%;
    max-height: 100%;
  }
  > i {
    position: absolute;
    right: -15px;
    top: -15px;
    display: block;
    width: 40px;
    height: 40px;
    background: url('~@/assets/images/upload_del.png') center no-repeat;
    background-size: 28px auto;
  }
}

.upload_button {
  flex: 0 0 auto;
  position: relative;
  display: flex;
  flex-flow: column;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border: 1px dashed #979797;
  border-radius: 8px;
  font-size: 24px;
  color: #999999;
  overflow: hidden;
  margin: .1rem 0;
  &::before {
    content: '';
    width: 50px;
    height: 50px;
    background: url('~@/assets/images/goods_upload_pictures@2x.png') center no-repeat;
    background-size: 50px auto;
  }
  input[type='file'] {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
  }
}

.img_view {
  position: fixed;
  z-index: -10;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  > img {
    max-width: 80%;
    max-height: 80%;
  }
  &.active {
    visibility: visible;
    z-index: 9;
  }
}